﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="TITLEAUTOR.aspx.vb" Inherits="PRUEVANET3.Formulario_web16" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        CellPadding="4" DataKeyNames="au_id,title_id" DataSourceID="SqlDataSource1" 
        EmptyDataText="No hay registros de datos para mostrar." ForeColor="#333333" 
        GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" 
                SortExpression="au_id" />
            <asp:BoundField DataField="title_id" HeaderText="title_id" ReadOnly="True" 
                SortExpression="title_id" />
            <asp:BoundField DataField="au_ord" HeaderText="au_ord" 
                SortExpression="au_ord" />
            <asp:BoundField DataField="royaltyper" HeaderText="royaltyper" 
                SortExpression="royaltyper" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
    AutoGenerateRows="False" DataKeyNames="au_id,title_id" 
    DataSourceID="SqlDataSource2" Height="50px" Width="125px">
        <Fields>
            <asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" 
                SortExpression="au_id" />
            <asp:BoundField DataField="title_id" HeaderText="title_id" ReadOnly="True" 
                SortExpression="title_id" />
            <asp:BoundField DataField="au_ord" HeaderText="au_ord" 
                SortExpression="au_ord" />
            <asp:BoundField DataField="royaltyper" HeaderText="royaltyper" 
                SortExpression="royaltyper" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowInsertButton="True" />
        </Fields>
</asp:DetailsView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConflictDetection="CompareAllValues" 
    ConnectionString="<%$ ConnectionStrings:PUBSConnectionString10 %>" 
    DeleteCommand="DELETE FROM [titleauthor] WHERE [au_id] = @original_au_id AND [title_id] = @original_title_id AND (([au_ord] = @original_au_ord) OR ([au_ord] IS NULL AND @original_au_ord IS NULL)) AND (([royaltyper] = @original_royaltyper) OR ([royaltyper] IS NULL AND @original_royaltyper IS NULL))" 
    InsertCommand="INSERT INTO [titleauthor] ([au_id], [title_id], [au_ord], [royaltyper]) VALUES (@au_id, @title_id, @au_ord, @royaltyper)" 
    OldValuesParameterFormatString="original_{0}" 
    SelectCommand="SELECT * FROM [titleauthor]" 
    UpdateCommand="UPDATE [titleauthor] SET [au_ord] = @au_ord, [royaltyper] = @royaltyper WHERE [au_id] = @original_au_id AND [title_id] = @original_title_id AND (([au_ord] = @original_au_ord) OR ([au_ord] IS NULL AND @original_au_ord IS NULL)) AND (([royaltyper] = @original_royaltyper) OR ([royaltyper] IS NULL AND @original_royaltyper IS NULL))">
    <DeleteParameters>
        <asp:Parameter Name="original_au_id" Type="String" />
        <asp:Parameter Name="original_title_id" Type="String" />
        <asp:Parameter Name="original_au_ord" Type="Byte" />
        <asp:Parameter Name="original_royaltyper" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="au_id" Type="String" />
        <asp:Parameter Name="title_id" Type="String" />
        <asp:Parameter Name="au_ord" Type="Byte" />
        <asp:Parameter Name="royaltyper" Type="Int32" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="au_ord" Type="Byte" />
        <asp:Parameter Name="royaltyper" Type="Int32" />
        <asp:Parameter Name="original_au_id" Type="String" />
        <asp:Parameter Name="original_title_id" Type="String" />
        <asp:Parameter Name="original_au_ord" Type="Byte" />
        <asp:Parameter Name="original_royaltyper" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:pubsConnectionString6 %>" 
        DeleteCommand="DELETE FROM [titleauthor] WHERE [au_id] = @original_au_id AND [title_id] = @original_title_id AND (([au_ord] = @original_au_ord) OR ([au_ord] IS NULL AND @original_au_ord IS NULL)) AND (([royaltyper] = @original_royaltyper) OR ([royaltyper] IS NULL AND @original_royaltyper IS NULL))" 
        InsertCommand="INSERT INTO [titleauthor] ([au_id], [title_id], [au_ord], [royaltyper]) VALUES (@au_id, @title_id, @au_ord, @royaltyper)" 
        ProviderName="<%$ ConnectionStrings:PUBSConnectionString.ProviderName %>" 
        SelectCommand="SELECT [au_id], [title_id], [au_ord], [royaltyper] FROM [titleauthor]" 
        
        UpdateCommand="UPDATE [titleauthor] SET [au_ord] = @au_ord, [royaltyper] = @royaltyper WHERE [au_id] = @original_au_id AND [title_id] = @original_title_id AND (([au_ord] = @original_au_ord) OR ([au_ord] IS NULL AND @original_au_ord IS NULL)) AND (([royaltyper] = @original_royaltyper) OR ([royaltyper] IS NULL AND @original_royaltyper IS NULL))" 
        ConflictDetection="CompareAllValues" 
        OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_au_id" Type="String" />
            <asp:Parameter Name="original_title_id" Type="String" />
            <asp:Parameter Name="original_au_ord" Type="Byte" />
            <asp:Parameter Name="original_royaltyper" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="au_id" Type="String" />
            <asp:Parameter Name="title_id" Type="String" />
            <asp:Parameter Name="au_ord" Type="Byte" />
            <asp:Parameter Name="royaltyper" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="au_ord" Type="Byte" />
            <asp:Parameter Name="royaltyper" Type="Int32" />
            <asp:Parameter Name="original_au_id" Type="String" />
            <asp:Parameter Name="original_title_id" Type="String" />
            <asp:Parameter Name="original_au_ord" Type="Byte" />
            <asp:Parameter Name="original_royaltyper" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
